package org.yankun.exam4j.common;

import java.io.Serializable;
import java.util.List;

public class Page<T> implements Serializable {

	private static final long serialVersionUID = 4675075021915660737L;
	private long pageSize;   //每页显示的条数
	private long recordSize; //总记录数
	private long pageIndex; //当前页数
	private long pageCount; //总页数

	private List<T> records;

	public long getPageSize() {
		return pageSize;
	}
	
	public void setPageSize(long pageSize) {
		this.pageSize = pageSize;
	}

	public long getRecordSize() {
		return recordSize;
	}

	public void setRecordSize(long recordSize) {
		this.recordSize = recordSize;
	}

	public long getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(long pageIndex) {
		this.pageIndex = pageIndex;
	}

	public List<T> getRecords() {
		return records;
	}

	public void setRecords(List<T> records) {
		this.records = records;
	}
	
	public long getPageCount() {
		return pageCount;
	}

	public void setPageCount(long pageCount) {
		this.pageCount = pageCount;
	}
	
	@Override
	public String toString() {
		return "records="+records+"; recordSize="  + recordSize + "; pageIndex=" + pageIndex + "; pageCount=" + pageCount +  "; pageSize=" +pageSize;
	}
}
